#!/bin/bash

PREFIX="${HOME}/.local"
PYTHON=`which python`

STARTER="
#!/bin/bash 
\n
\ncd \"${PREFIX}/share/audlib\"
\n
\nexec $PYTHON mlib.py
\n"

cat <<END
By default all files will be installed in $PREFIX 

If you don't wish this to happen either use the graphical installer or  copy the files manually and apply your common sense to make them work

Continue? (y/n)
END

read ANS

case $ANS in 

y|Y)
	cp -r local/* ${PREFIX}
	echo -e $STARTER > "${PREFIX}/bin/audlib"
	chmod u+x "${PREFIX}/bin/audlib"
	;;

*)
	echo "Aborting"
	;;
esac


